package me.a02demo2;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个数字");
        int num=sc.nextInt();
        boolean flag=isShui(num);
        System.out.println(flag);
    }
   public static boolean isShui(int num){
        int temp=num;
        int num2=num;
       int sum=0;
       int count=0;
       while(temp!=0){
           int a=temp%10;
           temp=temp/10;
           count++;
       }
       while(num>0){
           int b=num%10;
           sum=sum+b*count;
           num=num/10;
       }
       System.out.println(sum);
       if(sum==num){
           return true;
       }
       return false;
    }
}
